import http from '../utils/http'
import type {Comment} from '@/model/Dynamics'



// 进行评论区评论
export const send_comment = (
  objectId: string, 
  newComment:Comment
) => {
  return http.put(`/classes/Dynamics/${objectId}`, {
    // 数组型原子操作：Remove
    [`detail.comments`]: {
      "__op": "Add",
      "objects": [newComment]  // 符合规范：用objects包裹数组
    }
  });
};